<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:directive.page import="com.anhry.app.safety.util.Util"/>
<%@ include file="/WEB-INF/pages/share/taglib.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>核查报告管理</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=basePath+Util.SKIN%>/css/right.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<%=basePath%>/js/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="<%=basePath%>/js/dbdialog/lhgdialog.js"></script>
	<script type="text/javascript" src="<%=basePath%>/js/util.js"></script>
	<script type="text/javascript">
	   	function doFun(m){
	   		document.getElementById('cType').value=m;
			document.zcForm.submit();
		}
	   	function checkEdit(id){
	   		infoDialog('checkEdit','报告管理','650','320','<%=path%>/zczb/zc_checkEdit.action?objId='+id+'');
		}
	   	function checkDele(id){
	   		var cYear = '${cYear}';
	   		var cQuarter = '${cQuarter}';
	   		var cType = '${cType}';
	   		var size = '${page.size}';
	   		var num = '${page.num}';
	   		var url ='<%=basePath%>/zczb/zc_checkDele.action?objId='+id+'&cYear='+cYear+'&cQuarter='+cQuarter+'&cType='+cType+'&size='+size+'&num='+num+'';
	   		confirmDg('您确定删除么?',url);
		}
	   	function checkLook(id){
	   		infoDialog('checkLook','报告查看','650','320','<%=path%>/zczb/zc_checkLook.action?objId='+id+'');
		}
	</script>
  </head>
  
  <body>
	<div  class="body-box">
		<div class="map">
			<div class="map_con">
				您当前的位置：自查自报 &gt; 报告管理
			</div>
			
		</div>
		<s:set name="userType" value="#session.adminuser.tbUserGrade.id"></s:set>
		<div id="container">
		<table border="0" cellpadding="0" cellspacing="0" class="mytable">
			<tr><td align="center"><font><b>${corp.corpName }</b></font></td></tr>
		</table>
		<div class="tab_div">
			<s:if test="%{#userType==0 || #userType==1 || #userType==2}">
			<!--
				<div class="${cType==1?'tab_on':'tab' }"><a href="javascript:void(0);" onclick="doFun('1')">县(市、区)、开发区行业</a></div>  -->
				<div class="${cType==2?'tab_on':'tab' }"><a href="javascript:void(0);" onclick="doFun('2')">县(市、区)、开发区行业</a></div>
				<div class="${cType==3?'tab_on':'tab' }"><a href="javascript:void(0);" onclick="doFun('3')">县(市、区)、开发区安委会</a></div>
				<div class="${cType==4?'tab_on':'tab' }"><a href="javascript:void(0);" onclick="doFun('4')">市行业</a></div>
				<div class="${cType==5?'tab_on':'tab' }"><a href="javascript:void(0);" onclick="doFun('5')">市安委会</a></div>
			</s:if>
			<s:elseif test="%{#userType==3 || #userType==5}">
				<div class="${cType==2?'tab_on':'tab' }"><a href="javascript:void(0);" onclick="doFun('2')">县(市、区)、开发区行业</a></div>
				<div class="${cType==4?'tab_on':'tab' }"><a href="javascript:void(0);" onclick="doFun('4')">市行业</a></div>
			</s:elseif>
			<s:elseif test="%{#userType==4 || #userType==6}">
				<div class="tab_on"><a href="javascript:void(0);" onclick="doFun('2')">县(市、区)、开发区行业</a></div>
			</s:elseif><!-- 
			<s:elseif test="%{#userType==7}">
				<div class="tab_on"><a href="javascript:void(0);" onclick="doFun('1')">县(市、区)、开发区行业</a></div>
			</s:elseif> -->
			<s:elseif test="%{#userType==8}">
			<!--  
				<div class="${cType==1?'tab_on':'tab' }"><a href="javascript:void(0);" onclick="doFun('1')">县(市、区)、开发区行业</a></div>-->
				<div class="${cType==2?'tab_on':'tab' }"><a href="javascript:void(0);" onclick="doFun('2')">县(市、区)、开发区行业</a></div>
				<div class="${cType==3?'tab_on':'tab' }"><a href="javascript:void(0);" onclick="doFun('3')">县(市、区)、开发区安委会</a></div>
			</s:elseif>
		</div>
		<div class="tab_con">
			<fieldset class="serarch_set">
				<legend>
			  		<div class="search">查询条件</div>
			  	</legend>
			  	<form action="<%=basePath%>/zczb/zc_checkList.action?search=1" method="post" name="zcForm">
			   		<label style="width: 80px;">年度季度：</label>
			   			<s:select list="yearList" listKey="id" listValue="yearName" name="cYear" value="%{cYear}" theme="simple"></s:select>
			   			<s:select list="#{1:'1',2:'2',3:'3',4:'4'}" name="cQuarter" value="%{cQuarter}" theme="simple"></s:select>
			   		<input type="submit" value="搜 索" class="link_input" name="btnsx">
			   		<input type="hidden" name="num" value="${page.num }">
			   		<input type="hidden" name="size" value="${page.size }">
			   		<input type="hidden" name="cType" value="${cType }" id="cType">
			  	</form>
			</fieldset>
	    	<table border="0" cellpadding="0" cellspacing="0" class="mytable">
		   		<thead>
			    	<tr class="fixedHeaderTr">
			     		<th width="5%">序号</th>
			     		<th width="30%">标题</th>
			     		<th width="15%">年度、季度</th>
			     		<th width="25%">单位</th>
			     		<th width="10%">上报时间</th>
			     		<th width="15%">操作</th>
			    	</tr>
		   		</thead>
			   	<tbody>
			   		<s:if test="%{objList.size>0}">
			   			<s:iterator value="objList" id="obj" status="x">
				   			<tr>
					     		<td align="center">${x.index+1+(page.num-1)*page.size}</td>
					     		<td align="left">${obj.checkTitle }</td>
					     		<td align="center">${obj.checkYear}年第${obj.checkQuarter }季度</td>
					     		<td align="center">${obj.unitName }<s:if test="%{#obj.deptName!=null}">—${obj.deptName }</s:if> </td>
					     		<td align="center"><s:date name="#obj.checkDate" format="yyyy-MM-dd"/> </td>
					     		<td align="center">
						     		<a href="javascript:void(0);" onclick="checkLook('${obj.id }');">查看</a>
						     		<s:if test="%{#userType==0 || #userType==1}">
										<a href="javascript:void(0);" onclick="checkEdit('${obj.id }');">修改</a>
						     			<a href="javascript:void(0);" onclick="checkDele('${obj.id }');">删除</a>
									</s:if>
									<s:elseif test="%{#userType==2}">
										<s:if test="%{cType==5}">
											<a href="javascript:void(0);" onclick="checkEdit('${obj.id }');">修改</a>
							     			<a href="javascript:void(0);" onclick="checkDele('${obj.id }');">删除</a>
										</s:if>
									</s:elseif>
									<s:elseif test="%{#userType==3 || #userType==5}">
										<s:if test="%{cType==4}">
											<a href="javascript:void(0);" onclick="checkEdit('${obj.id }');">修改</a>
						     				<a href="javascript:void(0);" onclick="checkDele('${obj.id }');">删除</a>
										</s:if>
									</s:elseif>
									<s:elseif test="%{#userType==8}">
										<s:if test="%{cType==3}">
											<a href="javascript:void(0);" onclick="checkEdit('${obj.id }');">修改</a>
							     			<a href="javascript:void(0);" onclick="checkDele('${obj.id }');">删除</a>
										</s:if>
									</s:elseif>
									<s:elseif test="%{#userType==4 || #userType==6}">
										<s:if test="%{cType==2}">
											<a href="javascript:void(0);" onclick="checkEdit('${obj.id }');">修改</a>
							     			<a href="javascript:void(0);" onclick="checkDele('${obj.id }');">删除</a>
										</s:if>
									</s:elseif>
									<s:elseif test="%{#userType==7}">
										<s:if test="%{cType==1}">
											<a href="javascript:void(0);" onclick="checkEdit('${obj.id }');">修改</a>
							     			<a href="javascript:void(0);" onclick="checkDele('${obj.id }');">删除</a>
										</s:if>
									</s:elseif>
					     		</td>
					    	</tr>
			   			</s:iterator>
			    	</s:if>
			    	<s:else>
				    	<tr>
				     		<td align="center" colspan="6">暂无部门核查报告数据</td>
				    	</tr>
			    	</s:else>
			   	</tbody>
		  	</table>
		  	<div class="btn_page">
		  		<s:if test="%{#userType==0 || #userType==1}">
					<input type="button" class="link_input" value="录入报告" onclick="addFun();"/>
				</s:if>
				<s:elseif test="%{#userType==2}">
					<s:if test="%{cType==5}"><input type="button" class="link_input" value="录入报告" onclick="checkEdit('');"/></s:if>
				</s:elseif>
				<s:elseif test="%{#userType==3 || #userType==5}">
					<s:if test="%{cType==4}"><input type="button" class="link_input" value="录入报告" onclick="checkEdit('');"/></s:if>
				</s:elseif>
				<s:elseif test="%{#userType==8}">
					<s:if test="%{cType==3}"><input type="button" class="link_input" value="录入报告" onclick="checkEdit('');"/></s:if>
				</s:elseif>
				<s:elseif test="%{#userType==4 || #userType==6}">
					<s:if test="%{cType==2}"><input type="button" class="link_input" value="录入报告" onclick="checkEdit('');"/></s:if>
				</s:elseif>
				<s:elseif test="%{#userType==7}">
					<s:if test="%{cType==1}"><input type="button" class="link_input" value="录入报告" onclick="checkEdit('');"/></s:if>
				</s:elseif>
		  	</div>
		  	<div class="page">
				<jsp:include flush="true" page="../share/fenye.jsp">
				    <jsp:param name="url4page" value="/zczb/zc_checkList.action?cYear=${cYear}&cQuarter=${cQuarter }&cType=${cType }" />
			    </jsp:include>	
		    </div>
		</div>
		</div>
	</div>
  </body>
    <s:if test="%{tip!=null}">
	<script>
	alert('${tip}');
		msgDialog('${tip}','succ.png');
	</script>
  </s:if>
</html>
